import { ElLoading, } from 'element-plus'

/**
 * 加载效果
 * @param msg 加载提示
 */
let loading:any;
export const openLoad=(msg?:string)=>{
   loading=ElLoading.service({
        lock: true,
        text: msg?msg:'Loading',
        background: 'rgba(0, 0, 0, 0.7)',
    });
}

export const closeLoad=()=>{
    loading.close();
}